package cn.ren.hai.base.service.impl;

import cn.ren.hai.core.entity.QueryPage;
import cn.ren.hai.base.entity.RhDict;
import cn.ren.hai.base.mapper.RhDictMapper;
import cn.ren.hai.base.service.RhDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import cn.ren.hai.core.entity.PageInfo;
import cn.ren.hai.core.entity.QueryPage;


import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * 字典(RhDict)表服务实现类
 *
 * @author makejava
 * @since 2022-01-23 03:14:55
 */
@Service("rhDictService")
public class RhDictServiceImpl extends ServiceImpl<RhDictMapper, RhDict>  implements RhDictService {
    
    private final RhDictMapper rhDictMapper;
    
    public RhDictServiceImpl(RhDictMapper rhDictMapper) {
        this.rhDictMapper = rhDictMapper;
    }    

    @Override
    public PageInfo<RhDict> list(QueryPage<RhDict> page) {
        QueryWrapper<RhDict> queryWrapper = new QueryWrapper<>();
        PageHelper.startPage(page);
        return new PageInfo<>(rhDictMapper.selectList(queryWrapper));
    }
   
}

